<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .list .item{
            display: flex;
            /* justify-content: space-between; */
            align-items: center;
            margin: 20px;
            /* box-sizing: border-box; */
        }
        .list .item .left{
            border-radius: 10px;
            overflow: hidden;
        }
        .list .item img{
            width: 60px;
            height: 60px;
        }
        .list .item .middle{
            margin-left: 10px;
        }
        .list .item .right{
            margin-left: 70px;
        }
        .list .item .right button{
            width: 60px;
            height: 30px;
            background-color: orangered;
            border: none;
            border-radius: 15px;
            color: white;
        }
        .list .item .middle .name{
            font-weight: bold
        }
        .list .item .middle .desc{
            color:orangered;
        }
        .list .item .middle .store{
            color: rgb(163, 163, 163);
        }
    </style>
</head>
<body>
    <div id="app">
        <h1>热门单品</h1>
        <div class="list">
            <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic == 1 ? './2.jpeg' : item.pic == 2 ? './3.jpeg' : './4.jpeg'" alt="">
                </div>
                <div class="middle">
                    <div class="name">{{ item.name }} </div>
                    <div class="desc">{{ item.desc }} </div>
                    <div class="store">{{ item.store }} </div>
                </div>
                <div class="right">
                    <button>{{ item.status }} </button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
    let v = new Vue({
        el:'#app',
        data:{
            tasklist:[
                { id:1 , pic:1,name:'脐橙3斤 快递到家',desc:'兑换后入手价8.9元',status:'立即换', store:'适用门店'},
                { id:2 , pic:2,name:'耙耙柑2斤 快递到家',desc:'兑换后入手价9.9元',status:'立即换',store:'适用门店' },
                { id:3 , pic:3,name:'水果捞350g',desc:'兑换后入手价6.9元',status:'立即换',store:'适用门店' }
            ]
        }
    })
</script>